home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
China's Education
/
China's Education.iso
/
images
/
CHST.js
< prev
next >
Wrap
Text File
|
2004-06-08
|
2KB
|
84 lines
var imgHover=new Image();
imgHover.src="/images/arrow_hover.gif";
function chgImg(n) {
var img = eval("img"+n);
img.src=imgHover.src;
}
function restoreImg(n) {
var img = eval("img"+n);
img.src="/images/arrow.gif";
}
// =============================================================
// ╣÷╢»─┌╚▌▓┐╖╓
var iTimer;
// oScrollDivHeight ╡╚╙┌╣÷╢»─┌╚▌▓┐╖╓▓π╡─╕▀╢╚
var oScrollDivHeight = 115;
// oScrollBarHeight ╡╚╙┌╣÷╢»╠⌡▓┐╖╓╡─╕▀╢╚╝⌡╚Ñ╗¼┐Θ╡─╕▀╢╚
var oScrollBarHeight = 81;
// oTime ╬¬╣÷╢»╞╡┬╩
var oTime = 100;
function downIt()
{
//alert(mq.scrollHeight)
clearInterval(iTimer);
iTimer = setInterval("mq.doScroll('down');divImg.style.top=mq.scrollTop*oScrollBarHeight/(mq.scrollHeight-oScrollDivHeight)", oTime);
}
function upIt()
{
clearInterval(iTimer);
iTimer = setInterval("mq.doScroll('up');divImg.style.top=divImg.style.top=mq.scrollTop*oScrollBarHeight/(mq.scrollHeight-oScrollDivHeight)", oTime);
}
var scroll,oldY=0;
function startScroll(){
scroll=true;
divImg.setCapture();
if (oldY==0) oldY = event.y;
}
function scrollIt()
{
if (scroll==true && event.y>=oldY && event.y<=oScrollBarHeight+oldY && mq.scrollHeight>oScrollDivHeight){
divImg.style.top=event.y-oldY;
mq.scrollTop = (event.y-oldY)/oScrollBarHeight*(mq.scrollHeight-oScrollDivHeight);
}}
function stopScroll(){
document.releaseCapture();
scroll=false;
}
// =============================================================
// ╡╝║╜▓╦╡Ñ▓┐╖╓
var menu = new Array;
menu[0] = "menuBase";
menu[1] = "menuAdvance";
menu[2] = "menuLinian";
menu[3] = "menuDown";
function showMenu(n){
var obj = eval(menu[n]);
if(obj.style.visibility=="visible") return;
obj.style.visibility="visible";
for (i=0;i<4;i++){
mObj = eval(menu[i]);
if (i!=n) mObj.style.visibility="hidden";
}}
function hideMenu(n) {
var obj = eval(menu[n]);
obj.style.visibility="hidden";
}